package com.bears.god.sup.service;

import java.util.List;

import com.bears.god.sup.dao.DAOFactory;
import com.bears.god.sup.model.Income;

public class IncomeServiceImp implements IncomeService {

	@Override
	public List<Income> findAll() throws Exception {
		return DAOFactory.getIncomeDAO().findAll();
	}

	@Override
	public List<Income> findByfiveId(int num, int endnum) throws Exception {
		return DAOFactory.getIncomeDAO().findByfiveId(num, endnum);
	}

	@Override
	public void save(Income income) throws Exception {
		DAOFactory.getIncomeDAO().save(income);
		
	}

	@Override
	public void update(Income income) throws Exception {
		DAOFactory.getIncomeDAO().update(income);
		
	}

	@Override
	public Income findById(int id) throws Exception {
		return DAOFactory.getIncomeDAO().findById(id);
	}

}
